var express = require('express');
var router = express.Router();
var mysql = require('./tool/mysql');

/* GET home page. */
router.get('/', function(req, res, next) {
  // var obj = {
  //   title: "锋影-首页",
  //   list: [1,2,3,4,5,6],
  //   content:"<h3>测试= 和 -区别</h3>"
  // }
  // res.render('index',obj);
  res.render('index',{title:"锋影-首页",activeIndex:0,isBoss: false});
});
// 导航
router.get('/nav', function(req, res, next) {
  mysql.connect(function(db){
    var queryObj = {};
    var showObj = {};
    mysql.find(db,"nav",queryObj,showObj,function(result){
      res.send(result);
    })
  }) 
});

module.exports = router;
